package com.cg.annotation.withInterceptor.controller;

import com.cg.annotation.withInterceptor.LoginRequire;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.Mapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author cheyinbo
 * @description TODO
 * @date 2021/7/7 14:54
 */
@RestController
@RequestMapping("/method01")
public class Index2Controller {

    @GetMapping("/sourceA")
    public String sourceA(){
        return "访问A资源";
    }

    @LoginRequire
    @GetMapping("/sourceB")
    public String sourceB(){
        return "访问B资源";
    }

}
